import React, { Component } from 'react'
import ListItem  from './ListItem'

import index from './index.module.css'
export default class List extends Component {
    render() {
        const {todos,updataTodo,delectTodo} = this.props;
        return (
            <div className={index.list}>
                 {
                     todos.map(todo=><ListItem key={todo.id} todo={todo} updataTodo={updataTodo} delectTodo={delectTodo}/>)
                 }
            </div>
        )
    }
}
